//系统日志
function BasicLog_main() {
    return {
        dClick: function (cmp, r) {
            BasicLog_form().view({
                entityId: r.get('id')
            });
        },
        id: 'BasicLog_main',
        xtype: 'jgrid',
        clazz: BasicLog,
        order: [],
        where: [],
        top: [{
            xtype: 'textfield',
            op: 'like',
            name: 'opUser.name',
            text: '操作人'
        }, {
            xtype: 'textfield',
            op: 'like',
            name: 'opReson'
        }, '|', {
            vtype: 'daterange',
            itemId: 'start',
            end: 'end',
            xtype: 'datefield',
            op: '>=',
            name: 'opDate'
        }, {
            vtype: 'daterange',
            itemId: 'end',
            start: 'start',
            xtype: 'datefield',
            op: '<=',
            name: 'opDate'
        }, $.search, '->', {
            key: 'D',
            iconCls: ion.del,
            text: '删除日志',
            handler: function () {
                $('BasicLog_main').deletes({
                    validate: []
                });
            }
        }],
        columns: [{
            width: 100,
            text: '操作人',
            "name": "opUser.name",
            renderer: function (v) {
                return "<span class='label label-primary'>" + v + "</span>";
            }
        }, {
            width: 150,
            text: '操作人账号',
            "name": "opUser.uname"
        }, {
            width: 150,
            "name": "opDate"
        }, {
            width: 150,
            "name": "opIp"
        }, {
            width: 200,
            "name": "opUrl"
        }, {
            "name": "opReson",
            flex: 1
        }]
    }
}

function BasicLog_form() {
    return $({
        xtype: 'jform',
        clazz: BasicLog,
        fieldsSize: 1,
        hides: [],
        validate: [],
        fields: [{
            text: '操作人',
            "name": "opUser.name"
        }, {
            text: '操作人账号',
            "name": "opUser.uname"
        }, {
            "name": "opDate"
        }, {
            "name": "opReson"
        }, {
            "name": "opIp"
        }, {
            "name": "opUrl"
        }]
    })
}